home *** CD-ROM | disk | FTP | other *** search
- .so psroff.inc # Include the macros needed for output to Postscript
- .TH Export-OpenGL
- .SH NAME
- exp_ogl \- Open GL C Code geometry export filter
- .SH SYNOPSIS
- .PP
- This man page describes the options specific to the Open GL C Code
- geometry export converter.
- .PP
- .SH EXAMPLE CONVERSION SYNTAX
- .PP
- To convert a 3D Studio file to OpenGL C code using the default parameters
- listed in the setup.ini file:
- .IP
- pt -i 3ds -o opengl filename.3ds
- .PP
- To convert a Lightwave file to OpenGL C code and override some of the default
- options in setup.ini:
- .IP
- pt -i lw -o opengl -out-line-ending = cr filename.lw
- .PP
- .SH OVERVIEW
- .PP
- This geometry export converter writes out the scene database as a C code
- program in the Open GL scene description language. The resulting program
- can then be compiled and used to draw the 3d database directly using
- OpenGL. The database is output as a series of polygons with vertex
- positions, normals, colors and texture coordinates. In addition, the
- surface definitions (materials) associated with each polygon is used
- to set up the OpenGL shading parameters.
- .PP
- Please note that each object is output as a separate C code function in
- the resulting file (ie: "Sphere#1" is enclosed in a function like:
- Sphere#1() { open-gl-calls }).
- .PP
- .SH COMMAND LINE OPTIONS
- .PP
- The following options are specific to this import converter:
- .TP
- -o opengl
- This is the mandatory command line option which specifies that the data
- is to be exported using the Open GL C Code format converter.
- .TP
- -out-opengl-normals = [ yes | no ]
- If this option is set to 'yes' then vertex normals will be output along with
- each polygon vertex using the glNormal3f() function. If a polygon does not
- have any vertex normals associated with its vertices then nothing will
- be output.
- .TP
- -out-opengl-colors = [ yes | no ]
- If this option is set to 'yes' then vertex colors (r/g/b values)
- will be output along with each polygon vertex using the glColor3f() function.
- If a polygon does not have any colors associated with its vertices then
- the default surface (material) color will be output before the polygons
- are specified.
- .TP
- -out-opengl-textures = [ yes | no ]
- If this option is set to 'yes' then texture mapping coordinates (u/v coordinates)
- will be output along with each polygon using the glTexCoords() function.
- .TP
- -out-opengl-materials = [ yes | no ]
- If this option is set to 'yes' then surface shading parameters will be
- output along with the polygons as well as the basic vertex colors. The shading
- parameters set up Open GL's shading mechanism for the diffuse color, the
- specular color and the Phong shininess value. These values are taken from the
- current surface definition (material) that is associated with the current
- polygon being output. Note that the shading parameters will only be output
- when they change from the previous values that have been output (for optimized
- drawing).
- .TP
- -out-line-ending = [ cr | lf | crlf ]
- This common option selects which line terminator is to be used for the ASCII output
- file. Files destined for DOS/PC machines should use 'crlf', files for UNIX
- machines should use 'lf' and files for Macintosh machines should use 'cr'.
- The default is specific to which machine this converter is presently running
- on: 'crlf' for DOS/PC, 'lf' for UNIX and 'cr' for Macintosh. This option
- normally does not have to be specified unless you will be using the exported
- ASCII file on a different type of computer.
- .PP
- .SH CONVERSION NOTES
- .PP
- All concave polygons will be converted to convex polygons.
- .PP
- The ambient, diffuse and specular shading coefficients associated with
- the current surface definition will not be multiplied into the vertex color
- values.